package com.haha.controller.user;

import com.haha.common.ApiResponse;
import com.haha.domain.qo.user.UserRegisterQo;
import com.haha.service.user.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author zouwz5
 * @date 2025/10/2 20:28
 */
@RestController
@RequestMapping(value = "/user")
public class UserController {

    @Autowired
    private UserService userService;

    @PostMapping("/register")
    public ApiResponse register(@RequestBody UserRegisterQo userRegisterQo){

        return userService.register(userRegisterQo);
    }

    @GetMapping("/test")
    public ApiResponse test(){

        return ApiResponse.ok("test success");
    }
}
